package com.py.credit.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.py.framework.core.common.Page;

public interface BusinessModelBindDao {

	/**
	 * 绑定业务模型关系
	 * @param map
	 */
	void insertIntoBusiness(@Param(value="map")Map<String,String> map);
	/**
	 *修改 绑定业务模型关系
	 * @param map
	 */
	void updateBusiness(@Param(value="map")Map<String,String> map);
	/**
	 *删除绑定业务模型关系
	 * @param map
	 */
	void deleteBusiness(@Param(value="list")List<Integer> list);

	String selectModelId(@Param(value="name")String name);
	

	/**
	 * 获取列表
	 * 
	 * @return
	 */
	public List<Map<String, Object>> selectByConditionForPage(@Param(value = "columns") List<String> columns,
			@Param(value = "additionalColumns") String[] additionalColumns,
			@Param(value = "conditions") List<String> conditions, @Param(value = "page") Page page);
	
	public Map<String,Integer> countScoreRank(@Param(value="pcId")String pcId);
	
	public List<String> countChartByPer(@Param(value = "pcId")String pcId);
	
	/**
	 * 获取列表
	 * 
	 * @return
	 */
	public List<Map<String, Object>> getBindByConditionForPage(
			@Param(value = "officeId") String officeId,
			@Param(value = "modelName") String modelName,
			@Param(value = "showScoreLine") String showScoreLine,
			@Param(value = "columns") List<String> columns,
			@Param(value = "additionalColumns") String[] additionalColumns,
			@Param(value = "conditions") List<String> conditions, @Param(value = "page") Page page);
	
	
	
	
	public Map<String, Object> getBindInfo(@Param(value = "id")String id);
	
	public int insertBindInfo(@Param(value = "name")String name,@Param(value = "modelId")String modelId,@Param(value = "ywId")String ywId,@Param(value = "showScoreLine")String showScoreLine);

	public int updateBindInfo(@Param(value = "name")String name,@Param(value = "modelId")String modelId,@Param(value = "ywId")String ywId,@Param(value = "showScoreLine")String showScoreLine,@Param(value = "id")String id);

	public int updateBindInfoStatus(@Param(value = "id")String id,@Param(value = "status")String status);
	
	public int deleteBindInfo(@Param(value = "ids")List<String> ids);
	
	public  List<Map<String, Object>> getTopPoints(@Param(value = "modelId")String modelId);
	
	public  List<Map<String, Object>> getIndexs(@Param(value = "parentId")String parentId,@Param(value = "modelId")String modelId);
	
	public  Double getRadarScore(@Param(value = "tybm")String tybm,@Param(value = "pcId")String pcId,@Param(value = "indexIds")List<String> indexIds);

	public  String  getModelByPc(@Param(value = "pcId")String pcId);
	
	public  String  getEvalInfoByScore(@Param(value = "score")Double score,@Param(value = "modelId")String modelId);
	
	public void updateYysx(@Param(value = "yysx")String yysx,@Param(value = "id")String id);
	
	public String getEvailInfoScore(@Param(value="tybm") String tybm);
	
	public double selectMaxScore(@Param(value="indexCatModeId") String indexCatModeId);

	public void initPcDetailByEvalInfo(@Param(value = "pcId") String pcId, @Param(value = "modelId") String modelId,
									   @Param(value = "listTybm") List<Map<String,Object>> listTybm);

	public void updateImportId(@Param(value = "importId") String importId,
									   @Param(value = "tybm") String tybm,
									   @Param(value = "pcId") String pcId);

	void dzInitPcDetailByEvalInfo(@Param(value = "tybm") String tybm,
								  @Param(value = "modelId") String modelId,
								  @Param(value = "pcId") String pcId);

	void dzInsertCardsSfyzzAll(@Param("params") Map<String, Object> params);

	void dzInsertCardsZzsfdqAll(@Param("params") Map<String, Object> params);

	void dzInsertFinance(@Param("params") Map<String, Object> params);

	void dzInitPcDetailByModelTest(@Param(value = "tybm") String tybm,
								  @Param(value = "qymc") String qymc,
								  @Param(value = "pcId") String pcId);

	String dzGetEvailInfoScore(@Param(value = "dataId") String dataId);

	void deleteIndexScore(@Param(value = "dataId") String dataId);
	
	List<String>  getAlreadyDistributeRecord(@Param(value = "id") String id);
	
	void delDistributeCube(@Param(value = "id") String id);
	
	void addDeptCube(@Param(value = "deptId") String deptId,@Param(value = "id") String id);
	
	int  isAddDept(@Param(value = "deptId") String deptId,@Param(value = "id") String id);
	
	int  isUpdateDept(@Param(value = "modelId") String modelId,
			@Param(value = "ywId") String ywId,
			@Param(value = "deptId") String deptId,
			@Param(value = "id") String id);
	
}
